package com.sbj.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sbj.dto.req.BuyReq;
import com.sbj.dto.req.TransferGoodReq;
import com.sbj.dto.res.BuyGoodsRes;
import com.sbj.dto.res.BuyRes;
import com.sbj.dto.res.CountDownRes;
import com.sbj.dto.res.MemberStoreRes;
import com.sbj.entity.BuyGoods;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zmh.framework.sys.dto.request.common.PageResponseDTO;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author summer
 * @since 2024/08/10 10:02:39
 */
public interface IBuyGoodsService extends IService<BuyGoods> {

    /**
     * 查询列表
     * @param buyReq
     * @return
     */
    Page<BuyRes> lists(BuyReq buyReq);

    /*
    抢购商品列表
     */
    Page<BuyGoodsRes> webBuyGoods(PageResponseDTO pageResponseDTO);

    /**
     * 抢购订单
     * @param req
     */
    void submitBuyOrder(BuyReq req);



    /**
     * 支付订单
     * @param id
     * @return
     */
    MemberStoreRes payOrder(Integer id);

    /**
     * 取消订单
     * @param storeId
     */
    void cancelBuyOrder(Integer storeId);

    /**
     * 获取倒计时
     * @return
     */
    CountDownRes countDown();
}
